﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ThanhTu.GNC.Media.KQXS.DataAccess.BL;
using System.Data;

namespace GNCMedia.KQXS.Admin.UserControlsAdmin
{
    public partial class ActionComment : System.Web.UI.UserControl
    {
        
        protected void Page_Load(object sender, EventArgs e)
        {
            int pageIndex = 1;
            try
            {
                pageIndex = int.Parse(Request.QueryString["p"].ToString());
            }
            catch { }
            
            try
            {
                CommentBL vcommet = new CommentBL();
                int rowCount = 0;
                RepeaterComment.DataSource = vcommet.selectAll_Page(pageIndex, 10, ref rowCount);
                RepeaterComment.DataBind();
                NHPagingControl1.TotalPage = (rowCount % 10 == 0) ? rowCount / 10 : (rowCount / 10 + 1);
            }
            catch (Exception ex)
            {
                Response.Write("lỗi quản lý  comment" + ex);
            }
            finally
            {

            }
        }

       

    }
}